package com.atguigu.lease.app.controller;

import com.atguigu.lease.app.service.BrowsingHistoryService;
import com.atguigu.lease.common.result.Result;
import com.atguigu.lease.model.vo.app.HistoryItemVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@Tag(name = "浏览记录模块")
@RestController
@RequestMapping("/app/history")
public class HistoryController {
    @Autowired
    BrowsingHistoryService browsingHistoryService;
    @Operation(summary = "分页查询浏览记录")
    @GetMapping("/pageItem")
    public Result<Page<HistoryItemVo>> pageItem(@RequestParam Long current,
                                                @RequestParam Long size  ) {
        return Result.ok(browsingHistoryService.pageItem(current,size));
    }
}
